## 'data.frame': 241 obs. of 5 variables:
## $ country : chr "US" "US" "US" "US" ...
## $ date : Date, format: "2020-09-18" "2020-09-17" ...
## $ confirmed: num 6723933 6674411 6630051 6592342 6553652 ...
## $ deaths : num 198570 197633 196763 195781 194493 ...
## $ recovered: num 2556465 2540334 2525573 2495127 2474570 ...
GGPLOt2 Plots of Cumulative Cases and Deaths
Source: New York Times
cumm_deaths <-ggplot(df) +geom_line(aes(x=date,y=deaths),lwd=3,col="blue") +
scale_x_date(date_breaks = "1 month") +
scale_y_continuous(labels = comma) +
theme(axis.text.x=element_text(angle =- 45, vjust = 0.5)) +
labs(title="US Cumulative Total Deaths",x="Date Reported",y="Cumulative Deaths")
ggplotly(cumm_cases)
ggplotly(cumm_deaths)
GGPLOt2 Plots of Daily Deaths and Cases
Source: European CDPC
Average US Covid-19 Deaths/day
mean(df1death$Deaths)
## [1] 973.4755
NPR/Washington Uni 300,000 by Dec. 1,2020
(300000 - sum(df1death$Deaths))/73
## [1] 1389.192
Washington Uni and Yahoo/USA Today:
410,000 Jan. 1 2021
(410000 - sum(df1death$Deaths)) / 104 # Jan 1, 2021
## [1] 2032.798
Average Deaths/Day for Jan. 31, 2020
410,000
(410000 - sum(df1death$Deaths))/ 134 # Jan 31, 2020
## [1] 1577.694
Histograms of Daily Cases and Deaths


ggplot(df1) + geom_bar(aes(x=Deaths,fill=..count..),stat="bin")

ggplot(df1) + geom_bar(aes(x=Cases,fill=..count..),stat="bin")
